/*
 * @Description:
 * @Author: william
 * @Date: 2024-08-08 11:26:27
 * @LastEditors: william
 * @LastEditTime: 2025-10-24 15:49:20
 */
import { createSSRApp } from 'vue'
import App from './App.vue'
import * as Pinia from 'pinia'
import { setupStore } from './store'
import './utils/route.js'
import { setupI18n } from './lang'

import '@/styles/index.scss'
// 本地SVG图标
import 'virtual:svg-icons-register'

export function createApp() {
  const app = createSSRApp(App)
  setupStore(app)
  setupI18n(app)

  return {
    app,
    Pinia // 此处必须将 Pinia 返回，不返回会在nvue页面报错
  }
}
